package view;

import javax.swing.BoxLayout;
import javax.swing.JPanel;
import javax.swing.JLabel;

import java.awt.Font;

import javax.swing.JTextField;

import java.awt.GridLayout;
import java.awt.event.ActionListener;

import javax.swing.JPasswordField;
import javax.swing.JButton;

@SuppressWarnings("serial")
public class LoginPanel extends JPanel {
	private JTextField textField;
	private JPasswordField passwordField;
	private JButton loginButton;

	/**
	 * Create the panel.
	 */
	public LoginPanel() {
		setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
		
		JPanel panel = new JPanel();
		panel.setLayout(new GridLayout(3, 2, 5, 5));
		
		
		JLabel lblNewLabel = new JLabel("Name");
		lblNewLabel.setFont(new Font("Times New Roman", Font.PLAIN, 12));
		panel.add(lblNewLabel);
		
		textField = new JTextField();
		panel.add(textField);
		textField.setColumns(10);
		
		JLabel lblNewLabel_1 = new JLabel("New label");
		lblNewLabel_1.setFont(new Font("Times New Roman", Font.PLAIN, 12));
		panel.add(lblNewLabel_1);
		
		passwordField = new JPasswordField();
		panel.add(passwordField);
		
		loginButton = new JButton("Login");
		loginButton.setFont(new Font("Times New Roman", Font.PLAIN, 12));
		loginButton.setActionCommand("Login");
		panel.add(loginButton);
		
		add(panel);

	}

	public void addActionListener(ActionListener listener) {
		loginButton.addActionListener(listener);
		
	}

}
